package org.example.controller;

import jakarta.annotation.Resource;
import org.example.service.BusinessService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BusinessController {
    @Resource
    private BusinessService businessService;

    @RequestMapping("/buy")
    public String purchase()
    {
     String   userId = "1";
     String   commodityCode = "1";
     int   orderCount = 1;
        businessService.purchase(userId, commodityCode, orderCount);
        return "success";
    }
}
